package pkg

import (
	"fmt"
	"product/global/model"

	"github.com/elastic/go-elasticsearch/v8"
)

func EsConn() {
	var err error
	model.EsConn, err = elasticsearch.NewClient(elasticsearch.Config{
		Addresses: []string{"http://14.103.158.217:9200"},
	})
	if err != nil {
		panic(err)
	}
	fmt.Println("es conn success")
}
